package com.crm.common.crm.constant;


import com.crm.common.ka.core.common.Const;
import com.crm.common.ka.core.common.ResultCode;

/**
 * @author zhangzhiwei
 * crm响应错误代码枚举类
 */

public enum CrmCodeEnum implements ResultCode {
    //客户模块管理
    CRM_LEADS_REVOKETRANSFER_ERROR(20031, "线索中包含客户不能撤销转化!"),
    ADMIN_MODULE_CLOSE_ERROR(2001, "客户管理模块不能关闭"),
    CRM_FIELD_NUM_ERROR(2002, "每个模块最多存在"+ Const.QUERY_MAX_SIZE +"个字段"),
    CRM_LEADS_TRANSFER_ERROR(2003, "已转换线索不可重复转换"),
    CRM_DATE_REMOVE_ERROR(2004, "数据已被删除"),
    CRM_PRODUCT_CATEGORY_ERROR(2005, "该产品类别已关联产品，不能删除！"),
    CRM_PRODUCT_CATEGORY_CHILD_ERROR(2006, "该类别下有其他产品类别！"),
    CRM_MEMBER_ADD_ERROR(2007, "负责人不能重复选为团队成员！"),
    CRM_MEMBER_DELETE_ERROR(2008, "负责人不能退出团队！"),
    CRM_CONTRACT_DATE_ERROR(2009, "合同结束时间应大于开始时间！"),
    CRM_CONTRACT_NUM_ERROR(2010, "合同编号已存在，请校对后再添加！"),
    CRM_CONTRACT_EXAMINE_STEP_ERROR(2011, "没有启动的审核步骤，不能添加！"),
    CRM_CONTRACT_EXAMINE_USER_ERROR(2012, "没有审批人，不能添加！"),
    CRM_CONTRACT_CANCELLATION_ERROR(2013, "合同已作废，不能编辑"),
    CRM_CONTRACT_EXAMINE_PASS_ERROR(2014, "已通过的合同不能编辑"),
    CRM_CONTRACT_EDIT_ERROR(2015, "不能编辑，请先撤回再编辑！"),
    CRM_CONTRACT_TRANSFER_ERROR(2016, "已作废的合同不能转移！"),
    CRM_DATA_JOIN_ERROR(2017, "该条数据与其他数据有必要关联，请勿删除"),
    CRM_RECEIVABLES_ADD_ERROR(2018, "当前合同未审核通过，不能添加回款"),
    CRM_RECEIVABLES_NUM_ERROR(2019, "回款编号已存在，请校对后再添加！"),
    CRM_RECEIVABLES_EDIT_ERROR(2020, "只能编辑自己创建的回款"),
    CRM_RECEIVABLES_PLAN_ERROR(2021, "该回款计划已收到回款，请勿编辑"),
    CRM_CUSTOMER_SETTING_USER_ERROR(2022, "拥有客户已达上限，无法新增"),
    NO_APPROVAL_STEP_CANNOT_BE_SAVED(2023, "没有审批步骤，无法保存"),
    CRM_CUSTOMER_LOCK_ERROR(2024, "已成交客户无需锁定"),
    CRM_CUSTOMER_LOCK_MAX_ERROR(2025, "有员工可锁定客户数达到上限"),
    CRM_EXAMINE_RECHECK_ERROR(2026, "该审批已撤回"),
    CRM_EXAMINE_AUTH_ERROR(2027, "当前用户没有审批权限"),
    CRM_EXAMINE_RECHECK_PASS_ERROR(2028, "该审核已通过，不能撤回"),
    CRM_NEXT_TIME_ERROR(2029, "最后跟进时间必须大于当前时间"),
    CRM_CRMRETURNVISIT_NUM_ERROR(2030, "回访编号已存在，请校对后再添加！"),
    CRM_ILLEGAL_CHARACTERS_ERROR(2031, "包含非法字符"),
    CRM_PHONE_FORMAT_ERROR(2032,"手机号格式错误"),
    CRM_PRICE_FORMAT_ERROR(2033,"价格应为数字格式"),
    CRM_DATETIME_FORMAT_ERROR(2034,"日期格式错误，例:2020-01-01 00:00:00"),
    CRM_DATE_FORMAT_ERROR(2035,"日期格式错误，例:2020-01-01"),
    CRM_CUSTOMER_POOL_EXIST_USER_ERROR(2036,"公海内有客户，不能停用"),
    CRM_CUSTOMER_POOL_LAST_ERROR(2037,"最后一个启用公海不能停用"),
    CRM_FIELD_EXISTED(2038,"%s已存在"),
    THE_NUMBER_OF_CUSTOMERS_HAS_REACHED_THE_LIMIT(2039,"该员工拥有客户数已达上限"),
    CRM_NO_AUTH(2040, "没有权限"),
    CRM_CUSTOMER_POOL_USER_IS_NULL_ERROR(2041,"公海管理员或公海成员不能为空"),
    CRM_CUSTOMER_POOL_EXIST_USER_DELETE_ERROR(2042,"公海内有客户，不能删除"),
    CRM_CUSTOMER_POOL_LAST_DELETE_ERROR(2043,"最后一个启用公海不能删除"),
    CRM_PRINT_TEMPLATE_NOT_EXIST_ERROR(2044,"使用的打印模板不能为空"),
    CRM_PRINT_PRE_VIEW_ERROR(2045,"仅支持pdf和word格式预览"),
    CRM_BUSINESS_TYPE_RATE_ERROR(2046,"赢单率不能大于100"),
    CRM_BUSINESS_TYPE_OCCUPY_ERROR(2047,"使用中的商机组不可以修改"),
    CRM_CONTRACT_CONFIG_ERROR(2048,"请设置提前提醒天数"),
    CRM_CUSTOMER_SETTING_USER_EXIST_ERROR(2049,"已经有员工或部门信息包含在别的规则里面"),
    CRM_NUMBER_SETTING_LENGTH_ERROR(2050, "编号规则不得少于两级"),
    CRM_NUMBER_SETTING_DATE_NOTNULL_ERROR(2051, "启用重新开始编号需要有日期编号规则"),
    CRM_CAN_ONLY_DELETE_FOLLOW_UP_RECORDS(2052, "只能删除跟进记录"),
    CRM_RECEIVABLES_EXAMINE_PASS_ERROR(2053, "已通过的回款不能编辑"),
    CRM_CUSTOMER_POOL_NOT_EXIST_ERROR(2054, "不存在启用的公海"),
    CRM_MARKETING_UNSYNCHRONIZED_DATA(2055, "有未同步数据，不能删除！"),
    CRM_MARKETING_STOP(2056, "该推广停止使用"),
    CRM_MARKETING_QR_CODE_EXPIRED(2057, "二维码过期"),
    CRM_MARKETING_CAN_ONLY_BE_FILLED_ONCE(2058, "只能填写一次"),
    CRM_MARKETING_DATA_SYNCED(2059, "数据已同步"),
    CRM_CUSTOMER_POOL_DISTRIBUTE_ERROR(2060, "无权分配"),
    CRM_CUSTOMER_POOL_RECEIVE_ERROR(2061, "领取客户数超过限制"),
    CRM_CUSTOMER_POOL_RECEIVE_NUMBER_ERROR(2062, "今日领取次数超过上限"),
    CRM_CUSTOMER_POOL_PRE_USER_RECEIVE_ERROR(2063, "前负责人在限制时间内不能领取"),
    CRM_DATA_DELETED(2064, "%s已删除"),
    CRM_CUSTOMER_POOL_REMIND_ERROR(2065, "没有开启待进入公海提醒的公海规则"),
    CRM_CONTRACT_EXPIRATION_REMIND_ERROR(2066, "合同到期提醒未开启"),
    CRM_RETURN_VISIT_REMIND_ERROR(2067, "回访提醒未开启"),
    CRM_INVOICE_EXAMINE_PASS_ERROR(2068, "已通过的发票不能编辑"),
    CRM_POOL_FIELD_HIDE_ERROR(2069, "至少显示2列"),
    CRM_POOL_TRANSFER_ERROR(2070, "不能向停用公海转入客户"),
    CRM_CALL_DATA_UPDATE_ERROR(2071, "暂不支持编辑操作！"),
    CRM_CALL_DATA_QUERY_ERROR(2072, "%s不正确！"),
    CRM_CALL_UPLOAD_ERROR(2073, "文件上传失败！"),
    CRM_CALL_DOWNLOAD_ERROR(2075, "没有录音文件！"),
    CAN_ONLY_DELETE_WITHDRAWN_AND_SUBMITTED_EXAMINE(2076, "只能删除撤回和未提交的审批！"),
    CRM_SYNC_FAILED(2077, "同步失败:%s！"),
    CRM_ONLY_SYNC_DATA_FOR_WHICH_YOU_ARE_RESPONSIBLE(2078, "只能同步本人负责的数据！"),
    CRM_FIELD_ALREADY_EXISTS(2079, "%s已存在！"),
    SYSTEM_RELATED_FIELDS_CANNOT_BE_HIDDEN(2080, "系统关联字段不能隐藏！"),
    REQUIRED_OPTIONS_CANNOT_BE_HIDDEN(2081, "必填选项不能隐藏！"),
    INDEX_CREATE_FAILED(2082, "%s索引创建失败,数据初始化异常！"),
    CRM_CONTACTS_DATA_ERROR(2083, "检测到没有绑定客户，请确认！"),
    CRM_CONTRACT_EXAMINE_PASS_HINT_ERROR(2085, "已通过的合同需要作废后才可编辑！"),
    CRM_ACTIVITY_FORM_NONENTITY_ERROR(2086, "活动表单已不存在！"),
    THE_FIELD_NAME_OF_THE_FORM_CANNOT_BE_REPEATED(2087,"自定义表单字段名称不能重复"),
    THE_MONERY_LESS_THAN_THE_RECEIVE_MONERY(2089,"成交金额小于已回款金额"),
    CRM_CONTACTS_BIND_CUSTOMER_MORE_THAN_ONE(2090, "检测到该客户已绑定联系人，请确认！"),
    CRM_CONTACTS_REFUNDING_IS_TRUE_NUMBER_NEED(2091, "转期选择是，转前期数必填，请确认！"),
    CRM_CONTACTS_TURN_INTRODUCE_IS_TRUE_NUMBER_NEED(2092, "转介绍选择是，转介绍人必填，请确认！"),
    CRM_PUTIN_MONEY_PLATFORM_AND_COURSEPERIODS_ISEXIST(2093, "该投放日期存在该课程期数与投放平台数据，请确认！"),
    CRM_PUTIN_MONEY_NOT_ISEXIST(2094, "该ROI投放金额数据不存在，请刷新列表重试！"),
    CRM_REG_EXP_ERROR(2095,"请填写合法手机号码(长度11位)或电话号码(区号-电话)！"),
    CRM_CUSTOMER_CONTRACT_COUSE_ISEXIST(2096,"该客户下已存在同样课程的合同，请确认！"),
    CRM_PERIODS_IS_TOO_LONG(2097,"查询期数过大，期数间隔最大为16期，请确认！"),
    CRM_PERIODS_BEGIN_IS_LESS_THAN_END(2098,"开始期数大于结束期数，请确认！"),
    CRM_CONTRACT_JOIN_RECEIVABLES_ERROR(2099, "该条数据与其他数据有必要关联，请勿作废"),
    CRM_RECEIVABLES_SALES_USER_TOO_LONG(2100, "回款的分单销售过多，分单销售有且只能有一个"),
    CRM_RECEIVABLES_OWNER_USER_TOO_LONG(2101, "回款的负责人有且只能有一个"),
    CRM_RECEIVABLES_SALES_USER_CANNOT_MINE(2102, "回款的分单销售不能设为自己"),
    CRM_PUTIN_MONEY_CANNOT_DELETE(2103, "存在不可删除数据，ROI只可以删除待审核、拒绝及撤回的数据！"),
    CRM_RECEIVABLES_TEACHER_NOT_EXIST(2104, "提交审核时，营销讲师协作人不能为空！"),
    CRM_LARGESCREENSETTING_ALIAS_ISEXIST(2105, "大屏配置别名重复，请修改别名！"),
    CRM_LEADS_TRANSFER_FAIL(2106, "线索转化失败，请重试！"),
    CRM_LEADS_TRANSFER_DELETE(2107, "线索转化成功后不允许删除！"),
    CRM_LEADS_CONVERSION_MAXNUM(2108, "%s 超出最大分配线索数量"),
    CRM_LEADS_OWNER_USER_TOO_LONG(2109, "线索的负责人有且只能有一个"),
    CRM_LEADS_ADD_OR_UPDATE_ERROR(2110, "线索保存错误"),
    CRM_LEADS_IS_TRANSFER(2111, "已转化线索不允许删除"),

    CRM_UPDATE(2112, "CRM定时任务更新成交状态失败"),
    CRM_CHANGE_OWNERUSER_ERROR(2113, "变更负责人错误，非法负责人。"),
    CRM_CHANGE_TEACHER_ERROR(2114, "营销讲师有且只能有一个。"),
    CRM_LEADS_EDIT_ISTRANSFER_ERROR(2115, "已转化线索不允许编辑"),
    CRM_LEADS_TRANSFER_NOT_SIGNCLASS_ERROR(2116, "未报课线索不允许转化为客户。"),
    CRM_RECEIVABLES_MONEY_ERROR(2117, "实际付款金额应大于等于500或小于0。"),
    CRM_ROI_CHECKING_STATUS_ERROR(2118, "存在不可删除数据，ROI不允许删除审核中数据！"),
    CRM_ROI_NO_MONEY_ERROR(2119, "余额不足，请及时充值！"),
    CRM_TIME_TABLE_DATA_TEACHER(2120,"该讲师已创建课程"),
    CRM_TIME_TABLE_DATA_PERIODS(2121,"该课程期数已存在"),
    CRM_HEADQUARTERS(2122,"该渠道余额不足"),
    CRM_CUSTOMER_HAVE_RECEIVABLES(2123,"该客户下存在审批中或审批通过的回款信息，不允许编辑电话信息！"),
    CRM_LEADS_HAVE_TELEPHONE_OR_WECHAT(2124,"该负责人已有电话号/微信号相同的数据！%s"),
    CRM_RECEIVABLES_OTHER_CHECKSTATUS(2125,"勾选数据中存在审核状态为未通过的数据！"),
    CRM_RECEIVABLES_PAYMENT_DICT_SELECT(2126, "回款的付款方式请选择三级下拉"),
    CRM_RECEIVABLES_PAYMENT_DICT_BIND(2127, "请选择付款方式与部门"),
    CRM_OVERDUE_NUM_ERROR(2128, "逾期编号已存在，请校对后再添加！"),
    CRM_OVERDUE_EDIT_ERROR(2129, "只能编辑自己创建的逾期"),
    CRM_OVERDUE_THREE_ORDER_NO_ERROR(2130, "三方平台合同订单号或手机号无效"),
    CRM_REFUND_EDIT_ERROR(2131, "只能编辑自己创建的退款"),
    CRM_REFUND_EXAMINE_PASS_ERROR(2132, "已通过的退款不能编辑"),
    CRM_RECEIVABLES_MONEY_ZERO(2133, "实际付款金额应大于等于0"),
    CRM_REFUND_NUM_ERROR(2134, "退款编号已存在，请校对后再添加！"),
    CRM_REFUND_PAYMENT_DICT_SELECT(2135, "退款的付款方式请选择三级下拉"),
    CRM_REFUND_ADD_ERROR(2136, "当前合同未审核通过，不能添加退款"),
    CRM_NO_RECEIVABLES_PLAN_CHECK(2137, "只能审核还款"),
    CRM_RECEIVABLES_PLAN_EXAMINE_PASS_ERROR(2138, "已通过的还款不能编辑"),
    CRM_NO_BILL_RECEIVABLES_DATA_ERROR(2139, "合同下无账单分期回款，请确认后再导入"),
    CRM_BILL_RECEIVABLES_RETURN_TYPE_ERROR(2140, "合同付款方式必须为账单分期，请确认后再导入"),
    CRM_OVERDUE_MONEY_ZERO(2141, "逾期金额应大于0"),
    CRM_REFUND_MONEY_ZERO(2142, "退款金额应大于等于0"),
    CRM_OVERDUE_THREE_ORDER_NO_CONTRACTS(2143,"该三方平台订单号存在重复合同"),
    CRM_MOBILE_CONTRACTS(2144,"该学员电话存在重复合同"),
    CRM_FLOW_NOT_ISEXIST(2145, "请等待审批流加载，请重试！"),
    CRM_ORDER_POLL_PHONE(2146,"账单领取失败，学员手机号不正确。"),
    CRM_ERROR_PARAMETER_REQUIRED(2147,"参数错误，缺少必填参数"),
    CRM_STUDENT_POLL_WECHAT(2148,"学员领取失败，学员微信号不正确。"),
    CRM_NO_AUTH_RECEIVE(2149,"无权领取"),
    CRM_NO_AUTH_DISTRIBUTION(2150,"无权分配"),
    CRM_ORDER_NO_AUTH_DELETE(2151,"三方账单数据不可删除。"),
    CRM_CUSTOMER_HAVE_ZD_CONTRACT(2152,"该学员已有审核通过的合同，暂不能领取。"),
    CRM_REFUND_NOT_HAVE_CUSTOMER(2153,"学员不存在,请确认后重试~"),
    CRM_STUDENT_POLL_PHONE(2154,"学员领取失败，学员手机号不正确。"),
    CRM_ORDER_NO_AUTH_UPDATE(2155,"三方账单数据不可编辑。"),
    CRM_FIELD_EXTEND_CAN_NOT_DELETE(2156,"字段存在继承关系，不可删除。"),
    CRM_CUSTOMER_HAVE_QE_CONTRACT(2157,"该学员已有审核通过的合同，暂不能领取。"),
    CRM_CONTRACT_SUBMIT_ERROR_QK_CONTRACT(2158,"提交失败，该学员有审核通过的全款合同。"),
    CRM_CONTRACT_SUBMIT_ERROR_ZD_CONTRACT(2159,"提交失败，该学员已绑定账单合同。"),
    CRM_CONTRACT_SUBMIT_ERROR_SFK_CONTRACT(2160,"提交失败，该学员有审核通过的首付款合同。"),
    CRM_LEADS_CHANGE_USER_IS_NULL(2161,"请至少填写一个要转移的负责人选项"),
    CRM_RECEIVABLES_MONEY_GT_ZERO(2162,"实际付款金额需要大于0"),
    CRM_CONTRACT_MONEY_GT_ZERO(2163,"合同成交金额需要大于0"),
    CRM_AUDIT_EXAMINE_PROCESING(2164,"审批处理中！"),
    CRM_REFUND_NOT_HAVE_RECEIVABLES(2165,"暂不能提交，该合同没有审核通过的回款"),
    CRM_CONTRACT_RECEIVE_ERROR(2166,"该学员的首付款合同没有回款，暂不能领取"),
    CRM_RECEIVABLES_MONEY_EXCEED(2167,"回款总金额不能大于对应合同的成交金额"),
    BUSINESS_LOCK_DATA(2168,"数据锁定，正在处理中！"),
    STUDENT_IS_RECEIVE(2169,"该学员已被领取"),
    ORDER_IS_RECEIVE(2169,"该账单已被领取"),
    ORDER_SFK_NO_CHECK_NOT_RECEIVE(2170,"首付款回款审核未通过，暂不能领取账单。"),
    CRM_CONTRACT_SUBMIT_ERROR_TXBK_CONTRACT(2171,"提交失败，该学员有审核通过的线下合同。"),
    CRM_CONTRACT_SUBMIT_ERROR_FG_CONTRACT(2172,"提交失败，该学员有审核通过的复购合同。"),
    CRM_CUSTOMER_HAVE_TXBK_CONTRACT(2173,"该学员已有审核通过的合同，暂不能领取。"),
    CRM_CUSTOMER_IS_DROPOUT(2174,"该学员已经退学，不可新建线下合同。"),
    CRM_ORDER_REFUND_IS_NOT_DELETE(2175,"账单退款数据不可删除。"),
    CRM_REFUND_NOT_CHECK_OK_EDIT(2176,"暂不能编辑，未设置可编辑的全局字段。"),
    ;


    CrmCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private int code;
    private String msg;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
